package com.moon.mybatisplus.mapper.master;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.moon.mybatisplus.entity.Master;
import com.moon.mybatisplus.vo.MasterVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MasterMapper extends BaseMapper<Master> {


    @Select("select * from t_master where id =#{id}")
    List<Master> selectMaster(Integer id);


    @Select("select * from t_master m left join t_dog d  on m.dog_id = d.id  where m.id =#{id}")
    List<MasterVo> selectMasterVo(Integer id);

//    @Select("select * from t_master;")
    List<Master> selectMasterVoByXml();


}
